package com.ag.score;


import com.ag.score.thread.RecordThread;
import com.redis.RedisPlugin;
import de.codecentric.boot.admin.server.config.EnableAdminServer;
import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication(exclude = {})
@EnableAspectJAutoProxy
@EnableAdminServer
@MapperScan("com.ag.*.mapper")
@ComponentScan(basePackages = {"com.ag.*"})
@EnableScheduling
public class MinuteApiApplication extends SpringBootServletInitializer {
	protected final static Logger logger = LoggerFactory.getLogger(MinuteApiApplication.class);
	protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
		logger.info("----MinuteApiApplication 启动----");
		return application.sources(MinuteApiApplication.class);

	}
	public static void main(String[] args) {
		RedisPlugin.getIns();
		SpringApplication.run(MinuteApiApplication.class, args);

		RecordThread thread = new RecordThread();
		thread.start();
        logger.info(
                ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>MinuteApiApplication 启动成功<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
        );
	}
}